﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using Microsoft.AspNetCore.Server.IISIntegration;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AppFramework.DinosaursParkMes.DictionariesModel
{
    /// <summary>
    /// 字典主表
    /// </summary>
    [Table("tb_dictionaries")]
    public class Dictionaries : AuditedEntity<int>,ISoftDelete
    {
        /// <summary>
        /// 字典名称
        /// </summary>
        [Required, Display(Name = "字典名称")]
        public string Dictionariesname { get; set; }
        /// <summary>
        /// 排序id
        /// </summary>
        [Display(Name = "排序id")]
        public int? Sort { get; set; }
        /// <summary>
        /// 备注
        /// </summary
        [Display(Name = "备注")]
        public string Remark { get; set; }
        public bool IsDeleted { get; set; }
        public virtual IList<Dictionarieslist> DictionaryDetails { get; set; }
        public Dictionaries() { }
        /// <summary>
        /// 整体赋值
        /// </summary>
        /// <param name="dictionary"></param>
        public Dictionaries(string dictionariesname, string dicCode, int sort, string remark)
        {
            Dictionariesname = dictionariesname;
            Sort = sort;
            Remark = remark;
            DictionaryDetails = new List<Dictionarieslist>();
        }
        public void UpdateDictName(string name)
        {
            Dictionariesname = name;
        }
    }
}
